function move(ele, obj, cb){
    clearInterval(ele.t);
    ele.t = setInterval(()=>{
        let flag = true;
        for(let i in obj){
            let now = parseInt(getStyle(ele, i));
            let speed = (obj[i] - now)/10
            speed = speed < 0 ? Math.floor(speed) : Math.ceil(speed);
            ele.style[i] = now + speed + "px";
            if(now !== obj[i]) flag = false;
        }
        if(flag){
            clearInterval(ele.t);
            if(cb) cb();
        }
    }, 30);
}
function getStyle(ele, attr){
    return ele.currentStyle ? ele.currentStyle[attr] : getComputedStyle(ele)[attr];
}
